package cn.tedu.spring.eg3;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestShopController {
    public static void main(String[] args) {
        //先进行创建IoC容器
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext("cn.tedu.spring.eg3");
        //获取shopController的Bean值
        ShopController shopController = context.getBean(ShopController.class);
        //使用操作
        System.out.println("使用");
        //IoC的关闭销毁操作
        context.close();
    }
}
